package com.miplus.ccrm.core.service;

import com.miplus.ccrm.common.JPubUtils;
import com.miplus.ccrm.core.utils.SpringContextUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;


@Slf4j
@Component
public class JInitService implements CommandLineRunner {

    @Override
    public void run(String... args){
        log.info("JInitService.run：",args);

        Environment environment = (Environment) SpringContextUtil.getBean("environment");
        JPubUtils.Init(environment);
    }
}
